 <include file="application/home/view/public/header.html"/>
 <script src='__PUBLIC__/js/jquery-1.8.3.min.js' type='text/javascript'></script>
	<!-- BEGIN PAGE CONTENT-->
	<div class="row">
		<div class="col-md-12">
			<div class="portlet box blue">
				<div class="portlet-title">
					<div class="caption">
						<i class="fa fa-gift"></i>咨询投诉
					</div>
					<div class="tools">
						<a href="javascript:;" class="collapse">
						</a>
						<a href="#portlet-config" data-toggle="modal" class="config">
						</a>
						<a href="javascript:;" class="reload">
						</a>
						<a href="javascript:;" class="remove">
						</a>
					</div>
				</div>
				<div class="portlet-body">
					<div class="tabbable tabbable-tabdrop">
						<ul class="nav nav-tabs">
							<li class="active">
								<a href="#tab1" data-toggle="tab">咨询投诉</a>
							</li>
						</ul>
                        <style>
                         .table thead th{ text-align:center;}
                        </style>
						<div class="tab-pane" id="tab3">
								<!--写信息start-->
						        <div class="portlet-body form">
									<!-- BEGIN FORM-->
									<form class="form-horizontal" action="{:U('Mail/zixunAdd')}" enctype="multipart/form-data" method="post">
										<div class="form-body">
											<div class="form-group">
												<label class="control-label col-md-3">投诉对象 
												</label>
												<div class="col-md-4">
													<div class="input-icon right">
														<input type="text" value="{$serviceUser}" class="form-control" name="username"/>
													</div>
												</div>
											</div>
				                            <div class="form-group">
												<label class="control-label col-md-3">投诉主题 
												</label>
												<div class="col-md-4">
													<div class="input-icon right">
														<input type="text" class="form-control" name="title"/>
													</div>
												</div>
											</div>
											<div class="form-group">
												<label class="control-label col-md-3">投诉内容 
												</label>
												<div class="col-md-4">
													<div class="input-icon right">
														<textarea rows="4" cols="20" type="text" class="form-control" name="content"></textarea>
													</div>
												</div>
											</div>
											<div class="form-group">
												<label class="control-label col-md-3">投诉凭证 
												</label>
												<div class="col-md-4">
													<div class="input-icon right">
														<input type="file" class="form-control" name="file"></textarea>
													</div>
												</div>
											</div>
										</div>
										<div class="form-actions">
											<div class="row">
												<div class="col-md-offset-3 col-md-9">
													<button type="submit" class="btn green">提交</button>
													<button type="button" class="btn default">取消</button>
												</div>
											</div>
										</div>
									</form>
											<!-- END FORM-->
								</div>
					            <!--写信息end-->
							</div>
						<div class="tab-pane active" id="tab1">
        					<!--收件箱start-->
								<div class="row">
									<div class="col-md-12">
										<div class="portlet box grey-cascade" style=" border:none; margin-bottom:0px !important;">
											<div class="portlet-body">
												<div class="table-toolbar">
												</div>							
												<table class="table table-striped table-bordered table-hover" id="sample_1" style=" text-align:center;">
													<thead>
													<tr>
														<th>标题</th>
														<th>提交日期</th>
														<th>回复状态</th>
														<th>操作</th>
													</tr>
													</thead>
													<tbody>
													<!-- 收件箱 ······································································································-->
													
													<volist name='list' id='vo'>
														 <tr>
													  <td align="left">{$vo['title']}</td>
													  <td align="left">{$vo.add_time|date='Y-m-d',###}</td>
													  <td align="left">{$vo['huifu_status']}</td>
													  <td align="left">
													  <a href="/index.php/Home/Mail/zixunDetail/id/{$vo.id}">查看</a>&nbsp;
													  <a href="/index.php/Home/Mail/del/id/{$vo.id}">删除</a></td>
													</tr>
													</volist>						
													</tbody>
												</table>
											</div>
										</div>
									</div>
								</div>
								{$Page}
						 	<!--收件箱end-->
							</div>
					</div>
					<p>&nbsp;</p>
				</div>
			</div>
		</div>
	</div>
		<!-- END PAGE CONTAINER-->


			<!-- 查看详情页面-->
	<div id="details" class="details" style=" width:80%; border: 1px solid #222; height:700px; z-index:999;position: absolute; top:20px; background-color:#fff;display:none;">
		


		<!-- <div class="portlet blue-hoki box full-height-content full-height-content-scrollable"> -->
						<div class="portlet-title">
							<div class="caption">
								<i class="fa fa-cogs"></i>信件详情  <a id="detailsClose" style="float:right;margin-right:10px;">X</a>
							</div>
						</div>
						<div class="portlet-body">
							<div class="full-height-content-body">
                                <h3 style=" text-align:center;" id="title"></h3>
                                <hr>
								<p style="margin:50px;" id="content">
									
								</p>
								<!-- 判断是收件箱还是发件箱 -->
								
								<p style="margin:0px 70px 0px 0;float:right;" id="member">
									
								</p>
                                <p id="judge" style="margin:0px 0px;float:right;"></p>
								<br>
								<p style="margin:0px 70px;float:right;" id="add_time">
									
								</p>
						</div>
					</div>
				<!-- </div> -->
		


		

	</div>
			<!-- 详情页结束 -->


</div>
		<!-- BEGIN CONTENT -->
</div>
	<!-- END CONTENT -->
	<!-- BEGIN QUICK SIDEBAR -->	
	<!-- END QUICK SIDEBAR -->
</div>
<!-- END CONTAINER --> 
<script type="text/javascript">
	function fun(ob,id,type){
		//弹出详情页
		$('#details').css('display','block');
		var url = "{:U('Mail/details')}";
		$.post(url,{'message_id':id,'type':type},function(data){
			$("#title").text(data['title']);
			$("#content").text(data['content']);
			var add_time = Date(data['add_time']);
			$("#add_time").text(add_time);
			$("#judge").text(data['ren']);
			$("#member").text(data['member']);
		});
	}
	$("#detailsClose").click(function(){
		$("#details").css('display','none');
	})

</script>

<include file="App/Home/View/Public/footer.html"/>